﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JobsBoardDAL.DTOs;

namespace JobBoardAdminPanel.ViewModels
{
    public class IndustryViewModel : ViewModelBase
    {
        private IndustryDTO industry;

        public IndustryViewModel(IndustryDTO industry)
        {
            if (industry == null)
            {
                this.industry = new IndustryDTO();
            }
            else
            {
                this.industry = industry;
            }
        }

        public IndustryDTO Industry
        {
            get
            {
                return industry;
            }
            set
            {
                industry = value;
            }
        }

        public string IndustryName
        {
            get
            { 
                return industry.IndustryName; 
            }
            set
            {
                if (this.industry.IndustryName != value)
                {
                    this.industry.IndustryName = value;
                    OnPropertyChanged("IndustryName");
                }
            }
        }
    }
}
